package wechat_server

import (
	"gitee.com/justin0218/store/protos/wechat_server/proto"
	"google.golang.org/grpc"
)

var once = false
var conn proto.WechatClient

func GetClient() proto.WechatClient {
	if !once {
		grpcConn, err := grpc.Dial("127.0.0.1:50003", grpc.WithInsecure())
		if err != nil {
			return conn
		}
		conn = proto.NewWechatClient(grpcConn)
		once = true
	}
	return conn
}
